drop table if exists jms_dm.dm_customer_business_summary_dt;
create external table if not exists jms_dm.dm_customer_business_summary_dt(
   date_time               string     comment'日期'
  ,customer_id             bigint     comment'客户ID'
  ,customer_code           string     comment'客户编码'
  ,customer_name           string     comment'客户名称'
  ,agent_code              string     comment'代理编码'
  ,agent_name              string     comment'代理名称'
  ,fran_code               string     comment'加盟商编码'
  ,fran_name               string     comment'加盟商名称'
  ,network_code            string     comment'网点编码'
  ,network_name            string     comment'网点名称'
  ,cnt                     bigint     comment'票数'
  ,provider_id             string     comment'省份编码'
  ,provider_desc           string     comment'省份'
  ,city_id                 string     comment'城市编码'
  ,city_desc               string     comment'城市'
  ,area_id                 string     comment'区编码'
  ,area_desc               string     comment'区名称'
  ,attribute_id            bigint     comment'客户属性'
  ,customer_create_time    string     comment'客户签约年月'
  ,customer_category       bigint     comment'客户类别'
  ,order_source_code       string     comment'订单来源编码'
  ,order_source_name       string     comment'订单来源名称'
  ,type_id                 string     comment'类型ID'
  ,type_name               string     comment'类型名称'
  ,weight                  bigint     comment'内部计费重量,单位千克'
)comment '客户货量'
partitioned by (dt string comment '分区日期')
stored as parquet
location '/dw/hive/jms_dm.db/external/dm_customer_business_summary_dt'
tblproperties (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);
